import { Int, PrimaryUuid, Entity, Code, Link, Boolean, CreateDate, UpdateDate } from "../utils";
import { Index } from "typeorm";

@Entity({
    name: 'fj_hotel_image'
})
@Index('FJ_HOTEL_IMAGE_FROM_HOTELID', ['from', 'hotelid'])
export class FjHotelImage {
    @PrimaryUuid()
    id: string;
    @Int()
    hotelid: number;
    @Code()
    caption: string;
    @Link()
    image_url: string;
    @Int()
    order: number;
    @Boolean()
    is_default: boolean;
    @Code()
    from: string;
    @Code({ nullable: true })
    hash: string;

    @CreateDate()
    create_date: Date;

    @UpdateDate()
    update_date: Date;
}